package com.evo.chat.admin.domain;

import com.evo.chat.common.base.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

/**
 * @author luwenzheng
 * date 2020-02-05
 */
@Entity
@Table(name = "m_user_info")
public class AdminUser extends BaseEntity {

    @NotEmpty(message = "用户名不能为空")
    private String name;

    @NotEmpty(message = "用户密码不能为空")
    private String password;

    // 管理人员权限 预留字段
    private Integer permissions;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getPermissions() {
        return permissions;
    }

    public void setPermissions(Integer permissions) {
        this.permissions = permissions;
    }

    @Override
    public String toString() {
        return "AdminUser{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", permissions=" + permissions +
                '}';
    }
}
